package com.lecyon.farm.vo.add;

import com.lecyon.farm.base.BaseVo;
import com.lecyon.farm.common.constant.CommonConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * @author YaoZheng
 * @since 2020-04-13
 */
@Data
@ApiModel("新增同步信息设定表Vo")
public class AddFmSyncInformationVo extends BaseVo {

    @ApiModelProperty(name = "area_code", value = "区域编码", required = true)
    @NotBlank(message = "区域代码不能为空")
    @Length(min = CommonConstant.MIN_LENGTH_FIELD, max = CommonConstant.MAX_LENGTH_FIELD, message = "区域代码长度必须在{min} ~ {max}之间")
    private String areaCode;

    @ApiModelProperty(name = "work_type", value = "作业类型", required = true)
    @NotBlank(message = "作业类型不能为空")
    @Length(min = CommonConstant.MIN_LENGTH_FIELD, max = CommonConstant.MAX_LENGTH_DICT_FIELD, message = "作业类型长度必须在{min} ~ {max}之间")
    private String workType;

    @ApiModelProperty(name = "is_active", value = "是否启用")
    @Length(min = CommonConstant.MIN_LENGTH_FIELD, max = CommonConstant.MAX_LENGTH_BOOLEAN_FIELD, message = "作业类型长度必须在{min} ~ {max}之间")
    private String isActive = CommonConstant.WHETHER_TRUE;

    @ApiModelProperty(name = "remark", value = "备注")
    @Length(min = CommonConstant.MIN_LENGTH_FIELD, max = CommonConstant.MAX_LENGTH_REMARK_FIELD, message = "备注长度必须在{min} ~ {max}之间")
    private String remark;

}
